use binance::api::*;
use binance::model::*;
use binance::market::*;

use binance::errors::Error;
pub struct Bina {
    market:Market,
}

impl Bina {
    pub fn new() -> Bina {
        let market:Market = Binance::new(None, None);
        Bina {
            market
        }
    }
    pub fn get_price(&self, symbol:&str) -> Result<SymbolPrice, Error>{
        match self.market.get_price(symbol){
            Ok(answer) => { return Ok(answer);},
            Err(e)=> {println!("Bina Error: {}", e); Err(e) },
        }
    }
}